<?php

class CL_Output {

    private static $instance = NULL;

    public $buffer;
    public $vars = array();

    private function CL_Output() {
    }

    public static function get_instance() {
        if (self::$instance === NULL) {
            self::$instance = new CL_Output();
        }
        return self::$instance;
    }

    public function append($buffer) {
        $this->buffer .= $buffer;
    }

    public function assign_var($var, $value) {
        $this->buffer_vars(array($var => $value));
    }

    public function assign_vars($vars) {
        foreach ($vars as $var => $value) {
            $this->vars[$var] = $value;
        }
    }

    public function display() {
        echo $this->buffer;
    }
}


/* End of file Output.php */
/* Location: /system/libraries/Output.php */